package com.uflower.product.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.uflower.common.to.es.SkuEsModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;
@Data
public class ProductDetailVo {
    /**
     * 商品id
     */
    private Long spuId;
    /**
     * 商品名称
     */
    private String spuName;
    /**
     * 商品描述
     */
    private String spuDescription;
    /**
     *
     */
    private BigDecimal weight;
    /**
     * 上架状态[0 - 下架，1 - 上架]
     */
    private Integer publishStatus;
    //所有sku商品详情
    private SkuVo sku;

    private List<SpeciAttrAndGroup> speciAttrAndGroup;
    @Data
    public static class SkuVo{
        Long skuId;
        String skuName;
        String skuDesc;
        String skuDefaultImg;
        List<String> skuImages;
        /**
         * 标题
         */
        private String skuTitle;
        /**
         * 副标题
         */
        private String skuSubtitle;
        /**
         * 价格
         */
        private BigDecimal price;
        /**
         * 是否有库存
         */
        private Integer hasStock;
        private List<String> attrs;//销售属性
    }

    @Data
    public static class SpeciAttrAndGroup{
        Long attrGroupId;
        Long attrGroupName;
        List<String> attrAndValue;
    }
}
